badbdc451c5aa90b367f36389a45f51ac4c8aa93,SoulissApp/src/main/java/it/angelic/soulissclient/adapters/ProgramListAdapter.java,ProgramListAdapter,getView,#number#View#ViewGroup#,62
Before Change
RelativeLayout don = (RelativeLayout) convertView.findViewById(R.id.LinearLayout01);
don.setBackgroundResource(R.drawable.list_rect_red);
//holder.evidenza.setBackgroundColor(context.getResources().getColor(color.std_red_shadow));
holder.image.setImageResource(R.drawable.lighthouse1);
holder.image.setColorFilter(context.getResources().getColor(color.aa_red), PorterDuff.Mode.SRC_ATOP);
SoulissTriggerDTO intrig = triggers.get((int) holder.data.getCommandId());
After Change
holder.textCmd = (TextView) convertView.findViewById(R.id.TextViewCommand);
holder.textCmdWhen = (TextView) convertView.findViewById(R.id.TextViewCommandWhen);
holder.textCmdInfo = (TextView) convertView.findViewById(R.id.TextViewCommandInfo);
holder.image = (TextView) convertView.findViewById(R.id.program_icon);
holder.line = convertView.findViewById(R.id.StaticTileLine);
holder.data = programmi.get(position);
convertView.setTag(holder);
} else {
holder = (CommandViewHolder) convertView.getTag();
}
// holder.data.getCommand().getNodeId()
if (opzioni.isLightThemeSelected()) {
holder.textCmdWhen.setTextColor(context.getResources().getColor(R.color.black));
holder.textCmd.setTextColor(context.getResources().getColor(R.color.black));
holder.textCmdInfo.setTextColor(context.getResources().getColor(R.color.black));
}
//StringBuilder info = new StringBuilder(holder.data.toString());
holder.textCmd.setText(holder.data.getNiceName());
/* programma temporale */
if (holder.data.getType() == Constants.COMMAND_TIMED) {
RelativeLayout don = (RelativeLayout) convertView.findViewById(R.id.LinearLayout01);
//don.setBackgroundResource(R.drawable.list_rect_purple);
//holder.evidenza.setBackgroundColor(context.getResources().getColor(color.std_purple_shadow));
FontAwesomeUtil.prepareFontAweTextView(context, holder.image, "fa-clock-o");
holder.image.setTextColor(ContextCompat.getColor(context, color.std_blue_shadow));
holder.textCmdWhen
.setText(context.getString(R.string.execute_at) + " " + Constants.hourFormat.format(holder.data.getScheduledTime().getTime()));
if (holder.data.getInterval() > 0) {
String strMeatFormat = context.getString(R.string.programs_every);
holder.textCmdInfo.setText(String.format(strMeatFormat, holder.data.getInterval()));
} else {
holder.textCmdInfo.setText(context.getString(R.string.programs_recursive));
}
}/* programma POSIZIONALE */ else if (holder.data.getType() == Constants.COMMAND_COMEBACK_CODE
|| holder.data.getType() == Constants.COMMAND_GOAWAY_CODE) {
RelativeLayout don = (RelativeLayout) convertView.findViewById(R.id.LinearLayout01);
holder.image.setTextColor(ContextCompat.getColor(context, color.std_blue_shadow));
if (holder.data.getExecutedTime() != null) {
holder.textCmdWhen.setText(context.getString(R.string.last_exec)
+ " " + Constants.hourFormat.format(holder.data.getExecutedTime().getTime()));
} else {
holder.textCmdWhen.setText(context.getString(R.string.programs_notyet));
}
if (holder.data.getType() == Constants.COMMAND_GOAWAY_CODE) {
holder.textCmdInfo.setText(context.getString(R.string.programs_leave));
FontAwesomeUtil.prepareFontAweTextView(context, holder.image, "fa-sign-out");
} else {
holder.textCmdInfo.setText(context.getString(R.string.programs_come));
FontAwesomeUtil.prepareFontAweTextView(context, holder.image, "fa-sign-in");
}
/* Dimensioni del testo settate dalle opzioni */
holder.textCmdWhen.setTextSize(TypedValue.COMPLEX_UNIT_SP, opzioni.getListDimensTesto());